
const config = {
    port: process.env.PORT,
    // mysql5.7
    database:{
        DATABASE: process.env.DB_NAME,
        USERNAME: process.env.DB_USER,
        PASSWORD: process.env.DB_PASSWORD,
        PORT: process.env.DB_PORT,
        HOST: process.env.DB_HOST,
    },
    // mysql8.0
    // database:{
    //     DATABASE: process.env.DB_NAME || 'blogyk',
    //     USERNAME: process.env.DB_USER || 'root',
    //     PASSWORD: process.env.DB_PASSWORD || '123456',
    //     PORT: process.env.DB_PORT || '3306',
    //     HOST: process.env.DB_HOST || 'localhost',
    // },
    bcrypt: {
        saltRounds: 10, // 成本参数(推荐10-12)
        minLength: 8    // 密码最小长度限制
      },
          // JWT配置
    jwt: {
        secret: process.env.JWT_SECRET,
        expiresIn: '7d' 
    },
    
    // 文件上传配置
    upload: {
        maxSize: 10 * 1024 * 1024, // 10MB
        allowedTypes: ['jpg', 'jpeg', 'png', 'gif', 'svg']
    }
}
module.exports = config;